<template>
	<view>
		
		<button @click="onLog()">console.log</button>
		<button @click="onDebug()">console.debug</button>
		<button @click="onInfo()">console.info</button>
		<button @click="onWarn()" type="warn">console.warn</button>
		<button @click="onError()" type="warn">console.error</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:`print log`,
				name:`zhangsan`,
				pwd:`222`
			}
		},
		methods: {
			onLog(){
				// //log
				// console.log(`onLog()-->` + this.title)
				// //clog
				// console.log();
				// //clogv
				console.log('this.title: ',this.title);
				console.log('this.title: '+this.title);
				
			},
			onWarn(){
				if(name == `cyz`){
					console.log("onwarn-->success");
				}else{
					console.warn(`onwarn-->this is warn log`);
				}
			},
			onError(){
				console.error(`onError-->this is error message`);
				try{
					//..
				}catch(e){
					console.error("onError-->catch" + e)
				}
			}
		}
	}
</script>

<style>
	button{
		margin: 10rpx;
	}

</style>
